package ca.etsmtl.log210.vues;

import java.awt.BorderLayout;
import java.awt.EventQueue;
import java.awt.Image;
import java.net.MalformedURLException;
import java.net.URL;

import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;

public class GuiMapLivreur extends JFrame {
	private static ca.etsmtl.log210.controleurs.GestionnaireLivraison gestionnaireLivraison = ca.etsmtl.log210.controleurs.GestionnaireLivraison.getGestionnaireLivraison();
	private JPanel contentPane;

	/**
	 * Create the frame.
	 */
	public GuiMapLivreur(URL url) {
		setTitle("You are here :");
		setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		setSize(800, 800);
		setBounds(100, 100, 800, 800);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		contentPane.setLayout(new BorderLayout(0, 0));
		setContentPane(contentPane);
		
		ImageIcon icone = null;
		
		icone = new ImageIcon(url);
		Image imgLivreur =icone.getImage();
		Image newImage = imgLivreur.getScaledInstance(800,800,java.awt.Image.SCALE_SMOOTH);
		ImageIcon newIcone = new ImageIcon(newImage);
		
		JLabel lblImage = new JLabel(newIcone);
		contentPane.add(lblImage, BorderLayout.CENTER);
		
		
	}

}
